import base from '@/js/main/attribute/base.js';
import store from '@/js/store/state.js';
let picture = {
    setPictureSize: function(element, type) {
        if (element.component === 'Picture') {
            element.style.objectFit = type;
            if (type === 'reality') {
                base.setHeightPixel(element, store.getCanvas().height, element.data[0].height);
                base.setWidthPixel(element, store.getCanvas().width, element.data[0].width);
            }
        }
    },
    setValue: function(id, value) {
        let obj = JQuery('#' + id);
        obj.val(value);
    },
    getCustomPicName: function() {
        return window.getRootName() + 'DATA_URL';
    }
};
export default picture;